<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改资源信息</title>
<%@ include file="/app/includes/header.jsp"%>
	<script type="text/javascript">
		function updateRole(){
			$('#roleForm').submit();
		}
	</script>
</head>
<body>
	<div id="panel" class="easyui-panel" title="修改资源信息"
		icon="icon-edit-form" collapsible="true" style="padding: 10px;">
		<form id="roleForm" action="<%=request.getContextPath()%>/auth/resource/updateResource.action" 
				method="post" >
			<table class="table_form">
			<tr>
				<td>
					标识:
				</td>
				<td>
					<input id="id" name="id"  type="text" value="${resource.id}" readonly="readonly"></input>
				</td>
				<td >
				</td>
			</tr>
			<tr>
				<td>
					名称:
				</td>
				<td>
					<input id="name" name="name" type="text" value="${resource.name}"></input>
				</td>
				<td>
					<div id="nameTip"></div>
				</td>
			</tr>
			<tr>
				<td>
					路径:
				</td>
				<td>
					<input id="path" name="path" type="text" value="${resource.path}"></input>
				</td>
				<td>
					<div id="pathTip" ></div>
				</td>
			</tr>
			<tr>
				<td>
					父资源:
				</td>
				<td>
					<input id="parentId" name="parentId" type="text" value="${resource.parentId}"></input>
				</td>
				<td>
				</td>
			</tr>
			<tr>
				<td colspan="3">
					<div style="padding: 10px;" >
					<a href="#"  class="easyui-linkbutton" iconCls="icon-ok" 
						onclick="updateRole()">确定</a>
					<a href="javascript:history.back(-1)" class="easyui-linkbutton"  
						iconCls="icon-cancel">取消</a>
					</div>
				</td>
			</tr>
			</table>
		</form>
	</div>
</body>
	<script type="text/javascript">
		$(document).ready(function(){
		$.formValidator.initConfig({formid:"roleForm"});
		$("#name").formValidator({
			onshow:"请输入资源名称",
			onfocus:"请正确填写资源名称，例如：学生管理系统",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"名称不能为空！"});
		$("#path").formValidator({
			onshow:"请输入用路径",
			onfocus:"请正确填写名称，例如：管理权限/管理资源/学生信息管理",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"路径不能为空！"});
			});
	</script>
</html>